using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Hole : MonoBehaviour {

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void OnCollisionEnter2D(Collision2D collision)
    {
        var obj = collision.collider.gameObject;
        Cue c = obj.GetComponent<Cue>();
        CueMulti cm = obj.GetComponent<CueMulti>();
        if (c)
        {
            c.Removed();
        }
        else if (cm)
        {
            cm.Removed();
        }
        else
        {
            Destroy(obj);
        }
    }
}
